package com.one.piece.service;


import com.one.piece.document.Customer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface CustomerService {
    Customer findCustomer(String id);

    Customer save(Customer customer);

    void delete(String id);

    List<Customer> findByFirstNameOrLastName(String firstName, String lastName);

    List<Customer> findByFirstNameAndLastName(String firstName, String lastName);

    Page<Customer> findAll(Pageable pageable);

    Page<Customer> findAllSort(Pageable pageable);

    Page<Customer> findByFirstName(String firstName, Pageable pageable);

    Page<Customer> findByLastName(String lastName, Pageable pageable);

    Page<Customer> findByFirstNameOrLastName(String firstName, String lastName, Pageable pageable);

    Page<Customer> findByFirstNameAndLastName(String firstName, String lastName, Pageable pageable);

    Page<Customer> findByAgeBetween(int from, int to, Pageable pageable);

    Page<Customer> findByFirstNameLike(String firstName, Pageable pageable);

    Page<Customer> findByAddress(String address, Pageable pageable);

    Page<Customer> search(String id, Pageable pageable);


}